#ifndef __FORMULA_
#define __FORMULA_

#include <iostream>
#include <stack>
#include <string>
#include <map>
#include "domain_track_interval.h"

using namespace std;

class Formula {
public:
    Formula();
    void initNUm(string expres);
    DTInterval calresult(DTInterval x, DTInterval y);
private:
    string expres_ = "";
    string pre_num = "";
    string pre_operator = "";
    stack<string> nums;
    stack<string> operators;
    string zan[64] = {""};
    int czan = 0;
    stack<DTInterval> result;
    map<string, int> operators_priority;
};

#endif // __FORMULA_

